#ifndef OUTPUTDATA_H
#define OUTPUTDATA_H

#include <QDialog>
#include <qdir.h>

namespace Ui {
class OutputData;
}
class ListWidgetItem;
class ElementTreeModel;
class QListWidget;
class QListWidgetItem;
class ElementTreeItem;
class OutputData : public QDialog
{
    Q_OBJECT

public:
    explicit OutputData(ElementTreeModel* treeView,QListWidget* listWidget,QWidget *parent = nullptr);
    ~OutputData();
private:
    void onComboBoxFileNameIndexChanged(int index);
    void onPushButtonSelectClicked();
    void onPushButtonClearClicked();
    void onPushButtonRemoveClicked();
    void onPushButtonExportClicked();
    bool writeCSV(const QString&filePath);
    bool writeXlsx(const QString&filePath);
private:
    QMap<QListWidgetItem*,ElementTreeItem*> m_selecttingMap;
    QMap<QListWidgetItem*,ElementTreeItem*> m_selectedMap;
    ElementTreeModel* m_treeModel;
    QListWidget* m_listWidget;
    Ui::OutputData *ui;
};

#endif // OUTPUTDATA_H
